<%@ page contentType="text/html; charset=utf-8" import="java.net.InetAddress,common.*,java.sql.*,db.*,java.util.*"%>
<jsp:include page="/mobile/common/head.jsp"></jsp:include>

<%
request.setCharacterEncoding("utf-8");

String ent_id= (String)session.getAttribute("ent_id");
String search_gubun= request.getParameter("search_gubun")==null?"":request.getParameter("search_gubun");
String search_word = CommonUtil.nvl(request.getParameter("search_word"));
String search_flag =CommonUtil.nvl(request.getParameter("search_flag"));

String start_page = CommonUtil.nvl(request.getParameter("start_page"),"0");
String page_row =CommonUtil.nvl(request.getParameter("page_row"),"5");

String poi_cd =CommonUtil.nvl(request.getParameter("poi_cd"));
String poi_nm =CommonUtil.nvl(request.getParameter("poi_nm"));

Connection con=null;
ArrayList list =null;
ArrayList list2 =null;
HashMap userMap = new HashMap();
try {
	
	con = (new CommonConnect()).getConnection_ds1();
	String[] param=null;
	String[] param2=null;
	String queryStr ="";
	String queryStr2 = "";
//메인페이지의 리스트 내역을 가져온다.
	param= new String[1];
	param[0] = poi_cd;	
	
	queryStr = "call stu_edu1401Select3(?)";	
	list = DAO.select(con,queryStr,param);
	
	
	
	//System.out.println(list);
	
} catch (Exception e) {
	e.printStackTrace();
}finally {
	  try{
		  if (con!=null) con.close();
	  }catch(Exception ee){}
}
%>


<script >

$(document).ready(function(){
	$("#callAjax").click(function() {
		
		frm = document.mainform;
		frm.action = "/mobile/course_more.jsp";
		frm.submit();
	});
	
});

</script>
<body>
<div data-role="page">
	<div data-role="header">
    	<h1><%=poi_nm %>차시</h1>
    	<a href="#" id="callAjax" data-icon="check" class="ui-btn-right" data-theme="c">이전</a>
    </div>
    <div data-role="content">
<form name="mainform"  method="post">
<!-- 
<input type="hidden" name="search_gubun" value="<%=search_gubun%>">
<input type="hidden" name="search_word"  value="<%=search_word%>">
<input type="hidden" name="search_flag" value="<%=search_flag%>">
<input type="hidden" name="start_page" value="<%=start_page%>">
<input type="hidden" name="page_row" value="<%=page_row%>">
 -->
</form>	    
    	
    	
    	<ul data-role="listview" data-theme="d" data-inset="true" >
            
            <%		
			 for (int j=0; list!=null && list.size() > j; j++){
				HashMap map = (HashMap)list.get(j);
			%>
			<li>
				<h3  ><a href="#"><%=map.get("chasi_nm")%></a></h3>   <!-- style="text-overflow:clip;overflow:visible;" -->
                <p><%=map.get("detail_chasi_id")%>차시</p>
				<span class="ui-li-count"><%=map.get("page_cnt")%></span>			
			</li> 
			<%				
			}				
							
			if(list ==null ||  0>=list.size()){
			%>              
            <li>목차가 없습니다.</li>
            <%} %>   
            
            
        </ul>
       
    
    
    </div>

 	
      
    <jsp:include page="/mobile/common/footer.jsp"></jsp:include>
    
</div>
</body>
</html>
